//
//  SinaNetWork+Extersion.swift
//  Sina
//
//  Created by 星仔 on 2017/3/20.
//  Copyright © 2017年 xingZai. All rights reserved.
//

import Foundation

extension SinaNetWorksManager{
    
    
    /// 请求微博首页数据
    ///
    /// - Parameters:
    ///   - compeltion: 微博数据字典
    ///   - isSuccess: 成功/失败
    func statusList(compeltion:@escaping (_ list:[[String:AnyObject]]?,_ isSuccess:Bool)->()){
        let urlString = "https://api.weibo.com/2/statuses/home_timeline.json"
        requestToken(urlString: urlString, parameters: nil) { (jsons, isSuccess) in
            
            let result = jsons?["statuses"] as? [[String:Any]]
            compeltion(result as [[String : AnyObject]]?, isSuccess)
            
        }
    }
}
